<?php
// 用户信息表的字段验证器/类
namespace app\validate;
use think\Validate;
class User extends Validate
{
    protected $rule = [
        'name|姓名'=>[
            'require'=>'require',
            'min'=>5,
            'max'=>20
        ],
        'email|邮件'=>[
            'require'=>'require',
            'email'=>'email'
        ],
        'password|密码'=>[
            'require'=>'require',
            'min'=>3,
            'max'=>12,
            // 必须是字母+数字
            'alphaNum'=>'alphaNum'
        ],
        'mobile|手机'=>[
            'require'=>'require',
            'mobile'=>'mobile'
        ]
    ];
}